package wdrun

import "strings"

type Parameter struct {
	key   string
	value string
	help  string
}

type Cmd struct {
	cmd  string
	desc string
	args []*Parameter
}

func (c *Cmd) GetInfo() (string, string, []*Parameter) {
	return c.cmd, c.desc, c.args
}
func NewCmd(cmd, desc string) *Cmd {
	return &Cmd{
		cmd:  cmd,
		desc: desc,
		args: make([]*Parameter, 0),
	}
}
func (c *Cmd) AddParameter(key string, value interface{}, help string) {
	c.args = append(c.args, &Parameter{
		key:    strings.Trim(key,"-"),
		value: ToString(value),
		help:  help,
	})
}
